#ifndef DICTIONARY_H
#define DICTIONARY_H

/* Maximum size of the parts of words. */
#define MAX_PART_SIZE 5

/* Initializes the dictionary which stores and manages the parts of words. */
void dict_init();

/* Deletes the dictionary. */
void dict_delete();

/* Optimizes the dictionary creating a index for each part. */
void dict_optimize();

/*
 * Adds a word in the dictionary.
 * Automatically splits the word in parts and manages them.
 */
void dict_add(const char *word);

/*
 * Returns the index of the part.
 * If the part is already marked or not exists, returns -1.
 */
int dict_search(const char *part);

/* Marks the part of index 'index'. */
int dict_mark(int index);

/* Returns 1 if all parts were marked. 0, otherwise. */
int dict_is_empty();

#endif /* DICTIONARY_H */
